
#ifndef _TTG_SERVICES_SERVICES_
#define _TTG_SERVICES_SERVICES_
#include "Common/Definitions.h"

#include "Logger/LoggerSettings.h"
#include "TaskScheduler/TaskSchedulerSettings.h"

namespace ttg
{
	namespace services
	{
		//Wrapper-class, that provides unified access to ServiceBase
		//and allows change service settings.
		class Services
		{
			private:
				LoggerSettings logger_settings;
				TaskSchedulerSettings task_scheduler_settings;
			public:
				//Creates default configuration of services and [optionally] starts them.
				Services(bool should_start);
				//Returns settings for logger.
				inline LoggerSettings &logger()
				{ return logger_settings; }
				//Returns settings for task scheduler.
				inline TaskSchedulerSettings &taskScheduler()
				{ return task_scheduler_settings; }
				//Starts services.
				//In case of error throws ttg::Error().
				void start();
				//Stops services.
				//In case of error throws ttg::Error().
				void stop();
				//Stops all services.
				~Services();
		};
	}
}

#endif
